package Day5;

import java.util.Scanner;
import java.math.BigInteger;
// 1:无需package
// 2: 类名必须Main, 不可修改

public class Main4 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        //在此输入您的代码...
        BigInteger[] arr = new BigInteger[2021];
        arr[1] = arr[2] = new BigInteger("1");

        for(int i = 3; i <= 2020; i++){
          arr[i] = arr[i - 1].add(arr[i - 2]);
        }
        System.out.println(arr[2020].gcd(arr[520]));
        scan.close();
    }
}